import Vue from 'vue'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue'
import VueRouter from 'vue-router'
import router from './router'
import "./assets/icon/iconfont.css"
import store from './store'
import VueCookies from 'vue-cookies'
import VueI18n from "vue-i18n"


Vue.use(VueI18n);
const i18n = new VueI18n({
  locale: localStorage.getItem('langs')||'cn',
  messages: {
    'cn': require("./assets/i18n/cn"),
    'en': require("./assets/i18n/en"),
    'ja': require("./assets/i18n/ja"),
    'ko': require("./assets/i18n/ko")
  }
});


Vue.use(VueCookies)
Vue.use(ElementUI);
Vue.use(VueRouter)
Vue.config.productionTip = false

Vue.prototype.$msg = function (params) {
  this.$message({
    showClose: true,
    message: params,
    type: 'error'
  });
}
Vue.prototype.$msgsuccess = function (params) {
  this.$message({
    showClose: true,
    message: params,
    type: 'success'
  });
}
new Vue({
  
  router,
  store,
  i18n,
  render: h => h(App)
}).$mount('#app')
